<?php
	class Managedichvu extends CI_Model
    {
        public $ID;
        public $MaDichVu;
        public $MaDichVuCha;
        public $TenDichVu;
        public $GioiThieu;
        public $HienThi;
        public $NgayVietBai;
        public $ImageLink;
        public function __construct() {
            parent::__construct();
            $this->load->database();
        }

        public function ThemDichVu()
        {
            $insert = array('madichvu' => $this->MaDichVu,
                            'tendichvu' => $this->TenDichVu,
                            'hienthi' => $this->HienThi,
                            'madichvu_cha' => $this->NgayVietBai,
                            'imagelink' => $this->ImageLink);
            $result = $this->db->insert('dichvu', $insert);
            return $result;
        }
        
        public function ThemChiTietDichVu()
        {
            $insert = array('madichvu' => $this->MaDichVu,
                            'tendichvu' => $this->TenDichVu,
                            'gioithieu' => $this->GioiThieu,
                            'hienthi' => $this->HienThi,
                            'ngayvietbai' => $this->NgayVietBai,
                            'imagelink' => $this->ImageLink);
            $result = $this->db->insert('dichvu_chitiet', $insert);
            return $result;
        }
    }
?>